---
title: Test custom models locally
description: Use the DataRobot Model Runner tool (DRUM) to test and verify a Python, R, or Java custom model locally, before you upload it to DataRobot.

---

# Test custom models locally {: #test-custom-models-locally }

!!! info "Availability information"
     To access the DataRobot Model Runner tool, contact your DataRobot representative.

The DataRobot Model Runner tool, named DRUM, is a tool that allows you to test Python, R, and Java custom models locally. The test verifies that a custom model can successfully run and make predictions before you [upload it to DataRobot](custom-inf-model#create-cmodel). However, this testing is only for development purposes. DataRobot recommends that any custom model you wish to deploy is also tested in the [Custom Model Workshop](custom-inf-model#test-a-custom-inference-model) after uploading it.

Before proceeding, reference the guidelines for [setting up a custom model or environment folder](custom-model-assembly/index).

!!! note
     The DataRobot Model Runner tool supports Python, R, and Java custom models.

Reference the <a target="_blank" href="https://pypi.org/project/datarobot-drum/">DRUM readme</a> for details about additional functionality, including:

* Autocompletion
* Custom hooks
* Performance tests
* Running models with a prediction server
* Running models inside a Docker container

###  Model requirements {: #model-requirements }

In addition to the required folder contents, DRUM requires the following for your serialized model:

* Regression models must return a single floating point per row of prediction data.
* Binary classification models must return two floating point values that sum to 1.0 per row of prediction data.
* The first value must be the positive class probability, and the second the negative class probability.
* There is a single pkl/pth/h5 file present.

##  Run tests with the DataRobot CM Runner {: #run-tests-with-the-datarobot-cm-runner }

Use the following commands to execute local tests for your custom model:

``` sh title="List all possible arguments"

drum -help

```

<hr>

``` sh title="Test a custom binary classification model"

drum score -m ~/custom_model/ --input <input-dataset-filename.csv>  [--positive-class-label <labelname>] [--negative-class-label <labelname>] [--output <output-filename.csv>] [--verbose]

# Use --verbose for a more detailed output. Make batch predictions with a custom binary classification model. Optionally, specify an output file. Otherwise, predictions are returned to the command line.

```


``` sh title="Example: Test a custom binary classification model"

drum score -m ~/custom_model/ --input 10k.csv  --positive-class-label yes --negative-class-label no --output 10k-results.csv --verbose

```

<hr>


``` sh title="Test a custom regression model"

drum score -m ~/custom_model/ --input <input-dataset-filename.csv> [--output <output-filename.csv>] [--verbose]

# Use --verbose for a more detailed output. Make batch predictions with a custom regression model. Optionally, specify an output file. Otherwise, predictions are returned to the command line.

```


``` sh title="Example: Test a custom regression model"

drum score -m ~/custom_model/ --input fast-iron.csv --verbose

# This is an example that does not include an output command, so the prediction results return in the command line.

```
